package com.qf.springboot2203_02.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@RestController
public class DataController {
    @GetMapping("/date")
    Map<String, Object> getDate() {
        Date date = new Date();
        HashMap<String, Object> map = new HashMap<>();
        map.put("data", date);
        return map;
    }
}
